{% extends "base.html" %}

{% block content %}
 <form method="post" action="{{full_path}}?navTabId=detail_page" class="pageForm required-validate" onsubmit="return validateCallback(this, navTabAjaxDone);">
  <div  class ="panel">
   <h1>{{ user_detail.dept.name }}____{{edit_user.username}}</h1>
    <div class="pageContent">

        {% csrf_token %}
        <div class="pageFormContent" >
            <p>
                <label>用户名:</label>
                <input type="text" name="username" size="30" maxlength="30" class="required" value="{{edit_user.username}}"/>
            </p>
            <p>
                <label>真实姓名:</label>
                <input name="last_name" type="text" size="30" maxlength="30" class="required" value="{{edit_user.last_name}}"/>
            </p>
            <p>
            <label>密码:</label>

            <input type="password" name="password1" size="30" maxlength="20" alt="请输入密码."/>
            </p>
            <p>
            <label>重复密码:</label>

            <input type="password" name="password2" size="30" maxlength="20" alt="请输入密码."/>
            </p>
            <p>
               <label>&nbsp;</label>
            </p>
            <p>
                <label>&nbsp;</label>
            </p>
            <p>
                <label>职务:</label>
                <input name="title" type="text" size="30" maxlength="30" value="{{edit_user_detail.title}}"/>
            </p>
            <p>
                <label>&nbsp;</label>
            </p>
            <p>
                <label>生日：</label>
                <input name="birthday" type="text"  class ="date" value="{{edit_user_detail.birthday|date:'Y-m-d'}}"/>

                <a class ="inputDateButton" href="#">选择</a>
            </p>
            <p>
                <label>&nbsp;</label>
            </p>
            <p>
                <label>性别:</label>
                <select name="gender"  class="required combox">
                    <option value="1" {% if edit_user_detail.gender = 1 %}selected = "selected"{% endif%} >男</option>
                    <option value="0" {% if edit_user_detail.gender = 0 %}selected = "selected"{% endif%} >女</option>
                </select>
            </p>

            <p>
                <label>提交报表类型：</label>
                日报<input name="daily" type="checkbox" value="1" {% if edit_user_detail.schedule_list = 1 or edit_user_detail.schedule_list = 3 or edit_user_detail.schedule_list = 7 %}checked="checked"{%endif%}/>
                &nbsp;&nbsp;&nbsp;&nbsp;月报<input name="weekly" type="checkbox" value="2" {% if edit_user_detail.schedule_list = 2 or edit_user_detail.schedule_list = 6 or edit_user_detail.schedule_list = 7 %}checked="checked"{%endif%}/>
                &nbsp;&nbsp;&nbsp;&nbsp;周报<input name="monthly" type="checkbox" value="4" {% if edit_user_detail.schedule_list = 4 or edit_user_detail.schedule_list = 5 or edit_user_detail.schedule_list = 7 %}checked="checked"{%endif%}/>
            </p>
            <p>
                <label>电子邮箱：</label>
                <input name="email" type="text" size="30" maxlength="30" value="{{edit_user.email}}"/>
            </p>
        </div>
        <div class="formBar">
            <ul>
                <li><div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div></li>
                <li><div class="button"><div class="buttonContent"><button class="close" type="button">关闭</button></div></div></li>
            </ul>
        </div>
    </div>
  </div>
 </form>
{% endblock %}
